<?php
    session_start();
    
    $username=$_SESSION['username'];
    $filename=$_GET['file'];
    $type=$_GET['type'];

    header('Content-type: $type');
    header("Content-Disposition: attachment; filename='$filename'");
    readfile($filename);
?>
